﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SpaceShooter.ParticleSystem;
using Microsoft.Xna.Framework;
using SpaceShooter.Common;
using Microsoft.Xna.Framework.Graphics;

namespace SpaceShooter.GameObjects
{
    public class EnemyGameObject : GameObject
    {
        public EnemyGameObject(IGameScreen gameScreen, string modelName)
            : base(gameScreen, modelName)
        {
        }
    }

    public class UfoGameObject : EnemyGameObject
    {
        public UfoGameObject(IGameScreen gameScreen)
            : base(gameScreen, @"Models\p1_saucer")
        {
            this.InitialModelRotation = Matrix.CreateRotationY(MathHelper.Pi);  // 180 degree
            this.MaximumHealth = 60;
            this.RemainingHealth = this.MaximumHealth;
            this.DamageOnExplosion = 80;
        }

        protected override void Explode()
        {
            base.Explode();
            ExplosionParticleSystemHelper.Explode(50, 30, this);
        }
    }

    public class P1PencilGameObject : EnemyGameObject
    {
        public P1PencilGameObject(IGameScreen gameScreen)
            : base(gameScreen, @"Models\p1_pencil")
        {
            this.InitialModelRotation = Matrix.CreateRotationY(MathHelper.Pi);  // 180 degree
            this.MaximumHealth = 60;
            this.RemainingHealth = this.MaximumHealth;
            this.DamageOnExplosion = 80;
        }

        protected override void Explode()
        {
            base.Explode();
            ExplosionParticleSystemHelper.Explode(50, 30, this);
        }
    }

    public class P2PencilGameObject : EnemyGameObject
    {
        public P2PencilGameObject(IGameScreen gameScreen)
            : base(gameScreen, @"Models\p2_pencil")
        {
            this.InitialModelRotation = Matrix.CreateRotationY(MathHelper.Pi);  // 180 degree
            this.MaximumHealth = 60;
            this.RemainingHealth = this.MaximumHealth;
            this.DamageOnExplosion = 80;
        }

        protected override void Explode()
        {
            base.Explode();
            ExplosionParticleSystemHelper.Explode(50, 30, this);
        }
    }

    public class P2SaucerGameObject : EnemyGameObject
    {
        public P2SaucerGameObject(IGameScreen gameScreen)
            : base(gameScreen, @"Models\p2_saucer")
        {
            this.InitialModelRotation = Matrix.CreateRotationY(MathHelper.Pi);  // 180 degree
            this.MaximumHealth = 60;
            this.RemainingHealth = this.MaximumHealth;
            this.DamageOnExplosion = 80;
        }

        protected override void Explode()
        {
            base.Explode();
            ExplosionParticleSystemHelper.Explode(50, 30, this);
        }
    }

    public class P2WedgeGameObject : EnemyGameObject
    {
        public P2WedgeGameObject(IGameScreen gameScreen)
            : base(gameScreen, @"Models\p2_wedge")
        {
            this.InitialModelRotation = Matrix.CreateRotationY(MathHelper.Pi);  // 180 degree
            this.MaximumHealth = 60;
            this.RemainingHealth = this.MaximumHealth;
            this.DamageOnExplosion = 80;
        }

        protected override void Explode()
        {
            base.Explode();
            ExplosionParticleSystemHelper.Explode(50, 30, this);
        }
    }
}
